<script type="text/javascript">
    $(window).on('load', function () {

        $('.selectpicker').selectpicker({
            'selectedText': 'cat'
        });

        // $('.selectpicker').selectpicker('hide');
    });
    // Run the script on DOM ready:
    $(function(){
            $('input').customInput();
    });
</script>

<div class="row">
    <div class="col-xs-12">
        <div class="col-xs-7 space-section box shadow" >
            <ul class="list-group space-section">
                <?php foreach($posts as $data):?>
                <li class="row">
                    <div class="col-xs-2">
                        <?php echo Fuel\Core\Asset::img('icon/'.$data->type->thumbnail, array('class' => 'img-responsive'));?>
                    </div>
                    <div class="col-xs-10 anpha">
                        <label class="title">
                            <strong><?php echo \Fuel\Core\Html::anchor('frontend/post/view/'.$data->slug.'/'.$data->id, $data->title);?></strong>
                        </label>
                        <p class="hint"><?php echo date('\N\g\à\y d \t\h\á\n\g m \n\ă\m\ Y', $data->created_at);?> - Bởi <?php echo $data->users->username;?></p>
                        <span><?php echo $data->type->name;?> - <?php echo $data->course->name;?> - năm <?php echo $data->year;?>  </span> <br />
                        <span>Giảng viên : <a href="#"><?php echo $data->teacher->name;?></a> - <a href="#"><?php echo $data->university->name;?></a></span>
                    </div>
                </li>
                <?php endforeach;?>
            </ul>
            <div class="row">
                <div class="col-xs-12 text-center ">
                    <?php echo html_entity_decode($pagination);?>
                </div>
            </div>
        </div>
        <div class="col-xs-2 beta">
            <ul class="nav nav-divider space-section box">
                <li>
                   <div class="custom-checkbox">
                        <input id="check-1" type="checkbox" value="epic" name="genre"/>
                        <label class="" for="check-1">Đề thi cuôi kỳ</label>
                   </div>
                </li>
                <li>
                    <div class="custom-checkbox">
                        <input id="check-2" type="checkbox" value="epic" name="genre"/>
                        <label class="" for="check-2">Đề thi cuôi kỳ</label>
                   </div>
                </li>
                <li>
                    <div class="custom-checkbox">
                        <input id="check-3" type="checkbox" value="epic" name="genre"/>
                        <label class="" for="check-3">Đô án</label>
                   </div>
                </li>
                <li>
                    <div class="custom-checkbox">
                        <input id="check-4" type="checkbox" value="epic" name="genre"/>
                        <label class="" for="check-4">Tiểu luận</label>
                   </div>
                </li>
                <li>
                    <div class="custom-checkbox">
                        <input id="check-5" type="checkbox" value="epic" name="genre"/>
                        <label class="" for="check-5">Bài tập lớn</label>
                   </div>
                </li>
                <li>
                    <div class="custom-checkbox">
                        <input id="check-6" type="checkbox" value="epic" name="genre"/>
                        <label class="" for="check-6">Báo cáo</label>
                   </div>
                </li>
            </ul>

            <div class="space-max">
                <ul class="list-group list">
                    <li>
                        <a href="#">
                            <div class="bg-img">
                                <?php echo \Fuel\Core\Asset::img('icon/icon-eating.jpg', array('class' => 'img-responsive'));?>
                                <div>
                                    <label>Ăn uống</label>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li>
                        <a href="#">
                            <div class="bg-img">
                                <?php echo \Fuel\Core\Asset::img('icon/icon-visit.jpg', array('class' => 'img-responsive'));?>
                                <div>
                                    <label>Du lịch</label>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li>
                        <a href="#">
                            <div class="bg-img">
                                <?php echo \Fuel\Core\Asset::img('icon/icon-phuot.jpg', array('class' => 'img-responsive'));?>
                                <div>
                                    <label>Phượt</label>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li>
                        <a href="#">
                            <div class="bg-img">
                                <?php echo \Fuel\Core\Asset::img('icon/icon-film.jpg', array('class' => 'img-responsive'));?>
                                <div>
                                    <label>Phim</label>
                                </div>
                            </div>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
        <div class="col-xs-3 beta">
            <ul class="nav nav-divider space-section box">
                <li class='<?php echo isset($subnav) && $subnav == "home" ? "active" : ""; ?>'>
                    <?php echo \Fuel\Core\Html::anchor('home/index', 'Trang chủ');?>
                </li>
                <li class='<?php echo isset($subnav) && $subnav == "index" ? "active" : ""; ?>'>
                    <?php echo \Fuel\Core\Html::anchor('frontend/post/index', 'Đề thi');?>
                </li>
                <li class='<?php echo isset($subnav) && $subnav == "create_post" ? "active" : ""; ?>'>
                    <?php echo \Fuel\Core\Html::anchor('frontend/post/create', 'Đăng đề thi');?>
                </li>
                <li class='<?php echo isset($subnav) && $subnav == "index_happy" ? "active" : ""; ?>'>
                    <?php echo \Fuel\Core\Html::anchor('frontend/happy/index', 'Chém gió');?>
                </li>
            </ul>

            <div class="space-section box">
                <label class="label-sidbar">Lọc theo</label>
                <div class="row">
                    <div class="col-xs-12">
                        <select id="bs3Select" class="selectpicker show-tick form-control" data-live-search="true">
                            <option>Trường</option>
                            <option>ĐH Công nghệ</option>
                            <option>ĐH Kinh tế</option>
                            <option>ĐH Giáo dục</option>
                            <option>ĐH Ngoại ngữ</option>
                            <option>ĐH Công nghiệp</option>
                            <option>ĐH Văn hóa</option>
                            <option>ĐH Nghệ thuật</option>
                        </select>
                    </div>
                    <div class="col-xs-12">
                        <select id="bs3Select" class="selectpicker show-tick form-control" data-live-search="true">
                            <option>Môn học</option>
                            <option>ĐH Công nghệ</option>
                            <option>ĐH Kinh tế</option>
                            <option>ĐH Giáo dục</option>
                            <option>ĐH Ngoại ngữ</option>
                            <option>ĐH Công nghiệp</option>
                            <option>ĐH Văn hóa</option>
                            <option>ĐH Nghệ thuật</option>
                        </select>
                    </div>
                    <div class="col-xs-12">
                        <select id="bs3Select" class="selectpicker show-tick form-control" data-live-search="true">
                            <option>Thầy (cô) giáo</option>
                            <option>ĐH Công nghệ</option>
                            <option>ĐH Kinh tế</option>
                            <option>ĐH Giáo dục</option>
                            <option>ĐH Ngoại ngữ</option>
                            <option>ĐH Công nghiệp</option>
                            <option>ĐH Văn hóa</option>
                            <option>ĐH Nghệ thuật</option>
                        </select>
                    </div>
                    <div class="col-xs-12">
                        <select id="bs3Select" class="selectpicker show-tick form-control" data-live-search="true">
                            <option>Năm</option>
                            <option>2014</option>
                            <option>2013</option>
                            <option>2012</option>
                            <option>2011</option>
                            <option>2010</option>
                            <option>2009</option>
                            <option>2008</option>
                        </select>
                    </div>
                    <div class="col-xs-12">
                        <button type="button" class="btn col-xs-12 background">Lọc</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
